package abstractFactory;

/**
 * 具体工厂生成器(最关键的地方)
 */
public class FactoryProducer {
    public static AbstractFactory getFactory(String chose){
        if (chose.equalsIgnoreCase("shape")){
            return new ShapeFactory();
        } else if (chose.equalsIgnoreCase("color")) {
            return new ColorFactory();
        }
        return null;
    }
}
